<?php $this->registerCssFile('@web/css/details.css',['depends'=>['app\assets\AppAsset']]) ?>
<?php $this->registerJsFile('@web/js/addmore.js',['depends'=>['app\assets\AppAsset']]) ?>
<?php $this->registerJsFile('@web/js/details.js',['depends'=>['app\assets\AppAsset']]) ?>
<script>
    var a=<?=$mes ?>;
</script>
<div class="thing-details">
    <h2>招领启事</h2>
    <div class="thing-wrap row">
        <div class="thing-img col-sm-3">
            <img src="<?= $find["img_url"]?\yii\helpers\Url::to("@web/".$find["img_url"]):\yii\helpers\Url::to("@web/images/block.jpg"); ?>" alt="物品图片">
        </div>
        <div class="thing-more-details col-sm-9">
            <p><span class="property">物品类别:</span> <span class="thing-type"><?= $find["name"] ?></span></p>
            <p><span class="property">拾获日期:</span> <span class="thing-date"><?= $find["time"] ?></span></p>
            <p><span class="property">拾获地点:</span> <span class="thing-place"><?= $find["place"] ?></span></p>
            <p><span class="property">所属学院:</span> <span class="thing-belong"><?= $find["xueyuan"] ?></span></p>
            <p><span class="property">悬赏:</span> <span class="thing-repay"><?= $find["xuanshang"] ?></span></p>
            <p><span class="property">联系人:</span> <span class="thing-lname"><?= $find["person"] ?></span></p>
            <p><span class="property">电话:</span> <span class="thing-tel"><?= $find["tel"] ?></span></p>
            <p><span class="property">QQ:</span> <span class="thing-qq"><?= $find["qq"] ?></span></p>
            <p id="thing-mes-wrap"><span class="property">想说的话:</span> <span class="thing-mes"><?= $find["more"] ?></span></p>
        </div>
    </div>
</div>
<div class="thing-clue row">
    <div class="relate-clue col-sm-8">
        <h3>相关线索</h3>
        <?php   $count_i=0;
            foreach($hints as $key => $value){
                $count_i++;
        ?>
            <div class="stu-reply-wrap <?=$count_i>5?"hidden":'';?>">
                <div class="stu-reply">
                    <p><span>有同学回复:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span><?=date("Y-m-d H:i",$value["time"]) ?></span></p>
                    <p><?=$value["content"] ?></p>
                </div>
            </div>
        <?php }?>
        <div id="addmore" class="center-block h5"><span>加载更多</span></div>
    </div>
    <div class="leave-message col-sm-4">
        <h3>我有线索</h3>
        <form action="?r=details/find_details&id=<?=$find["id"] ?>" class="form" method="post">
            <textarea name="message" rows="4"></textarea>
            <button type="submit" name="mes-submit" class="btn btn-primary">提交</button>
            <input name="_csrf" type="hidden" id="_csrf" value="<?= Yii::$app->request->csrfToken ?>">
        </form>
    </div>
</div>